<%--
  Created by IntelliJ IDEA.
  User: kezs
  Date: 2017/10/11
  Time: 16:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="utf-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
<head>
    <title>葫芦之家--因为梦想一直都在努力--我还是个平庸的程序员</title>
    <meta name="keywords" content="葫芦之家,huluhome" />
    <meta name="description" content="葫芦之家，java，mybatis,redis,zookeeper,hadoop,kafka,mysql" />

    <link href="static/style/themes/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="static/scripts/js/jquery/jquery.js"></script>
    <script type="text/javascript" src="static/scripts/js/common.js"></script>
    <script type="text/javascript" src="static/scripts/js/jquery/jquery.cycle.all.min.js"></script>
    <script type="text/javascript">    Lazyload("style/themes/images/space.gif");</script>

    <!--[if IE 6]>
    <link href="static/style/themes/ie6.css" rel="stylesheet" type="text/css" />
    <script src="http://letskillie6.googlecode.com/svn/trunk/letskillie6.zh_CN.pack.js"></script>
    <script type="text/javascript" src="../../Scripts/Js/PNG.js"></script>
    <script>DD_belatedPNG.fix('.png_bg');</script>
    <![endif]-->


</head>
<body>
<!--顶部导航开始 -->
<%@include file="header.jsp" %>
<!--顶部导航结束 -->

<!-- 内容开始-->
<div id="wrapper" class="clearfix">
    <div id="art_container clearfix">
        <div id="art_main" class="fl">
            <div id="slideshow">
                <div class="slideshow">
                    <div id="featured_tag"></div>
                    <div id="tag_c"></div>
                    <div id="slider_nav"></div>
                    <div id="slider" class="clearfix">
                        <c:forEach items="${homeArticleList}" var="article">
                            <div class="featured_post" >
                                <div class="slider_image">
                                    <a href="/details/${article.id}" rel="bookmark" title="${article.title}">
                                        <img class="home-thumb" src="${article.picUrl}" width="350px" height="248px" alt=""/>  </a>     </div>
                                <div class="slider_post">
                                    <h3><a href="/details/${article.id}" rel="bookmark" title="${article.title}">${article.title}</a></h3>

                                    <p>
                                        <c:choose>
                                        <c:when test="${fn:length(article.content)>200}">
                                            <c:out value="${fn:substring(article.content, 0, 300)}"/>...
                                        </c:when>
                                        <c:otherwise>
                                            <c:out value="${article.content}"/>
                                        </c:otherwise>
                                    </c:choose>
                                    </p>
                                    <div class="clear"></div>
                                </div>
                            </div>
                        </c:forEach>
                    </div>
                </div>
            </div>
            <!-- ad position -->
            <div class="ad_h">
                <div class="ad_h_c">
                    <p align="center"><a href="#/" target="_blank">
                        <!-- 广告位开始-->
                        <script type="text/javascript">
                            /*首页横幅2*/
                            var cpro_id = "u3118800";
                        </script>
                        <script type="text/javascript" src="http://cpro.baidustatic.com/cpro/ui/c.js"></script>
                        <!-- 广告位结束-->
                    </p>
                    <div class="clear"></div>
                </div>
            </div>
            <!-- end ad -->
            <c:set var="box_content_noPic" value="box_content_noPic"/>
             <c:forEach items="${articleList}" var="article">
                 <div class="art_img_box clearfix">

                     <c:if test="${fn:length(article.picUrl)>0}">
                         <div class="fl innerimg_box"> <a href="/details/${article.id}" title="图片title" class="preview" target="_blank">
                             <img src='<c:out value="${article.picUrl}"/>' width="200" height="154" /></a>
                         </div>
                         <c:set var="box_content_noPic" value=""/>
                     </c:if>


                     <div class="fr box_content ${box_content_noPic}">
                         <h2>
                             <a href="/details/${article.id}" title="tttt" target="_blank">
                                 <c:out value="${article.title}"/>
                             </a>
                         </h2>
                         <div class="info">
                             <span>关键字 </span>：<span><small><c:out value="${article.keyword}"/></small></span>
                         </div>

                         <p class="intro">
                             <c:choose>
                                 <c:when test="${fn:length(article.content)>200}">
                                     ${fn:substring(article.content, 0, 200)}...
                                 </c:when>
                                 <c:otherwise>
                                     <c:out value="${article.content}"/>
                                 </c:otherwise>
                             </c:choose>

                         </p>
                     </div>
                     <c:if test="${article.recommId == 4}">
                         <!-- 标记为最新-->
                         <div class="news"></div>
                     </c:if>

                 </div>


             </c:forEach>





             <!-- 分页按钮开始 -->
            <div class="page_navi">
                <a href="${prevPageIndexUrl}" >上一页 </a>
                <a href='${nextPageIndexUrl}' class='extend' title='下一页'>下一页</a>
            </div>
        </div>
             <!-- 分页按钮结束 -->
        <!-- art_main end-->
         <%@include file="sider.jsp"%>
    </div>
</div>
<!-- 内容结束-->

<!-- //底部模板start -->
<%@include file="footer.jsp"%>
<!-- //底部模板end -->
</body>
</html>
